﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="EmptyWallGallery.FrontEnd.inside.Account.Login" %>
<%@ Import Namespace="EmptyWallGallery.Core" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%= Configs.WebTitle %> &lsaquo; Đăng nhập</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noindex, nofollow" />
    <link rel="stylesheet" href="<%= ResolveUrl("~/css/admin.css") %>" media="screen" type="text/css" />
    <script type="text/javascript" src="/Library/jquery-1.4.4.min.js"></script>
    <style type="text/css">
        body { background-color: #368EE0; }
        .login .wrapper h1 > a { color: #FFFFFF; display: block; font-size: 48px; font-weight: 300; padding: 2px 0; text-align: center; text-decoration: none; }
        .login .wrapper h1 > a img { margin-right: 20px; margin-top: -8px; }
        img { border: 0 none; height: auto; max-width: 100%; vertical-align: middle; }
        .login .wrapper { height: 500px; left: 50%; margin: -200px; position: absolute; top: 50%; width: 400px; }
        .login .wrapper .login-body { background: none repeat scroll 0 0 #FFFFFF; margin-top: 20px; }
        .login .wrapper .login-body h2 { color: #333333; font-size: 24px; font-weight: 300; padding: 20px 30px 5px; }
        h1, h2, h3 { line-height: 40px; }
        .control-group { margin-bottom: 10px; }
        .login .wrapper .login-body .email input, .login .wrapper .login-body .pw input { height: 35px; padding: 8px 12px; }
        .control-group.success input, .control-group.success select, .control-group.success textarea { border-color: #468847; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; }
        .control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; }
        .input-block-level { -moz-box-sizing: border-box; min-height: 30px; width: 100%; }
        .login .wrapper .login-body form { padding: 0 30px; }
        form { margin: 0 0 20px; }
        .btn { -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none; -moz-border-top-colors: none; background-color: #F5F5F5; background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6); background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) #B3B3B3; border-image: none; border-radius: 4px; border-style: solid; border-width: 1px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); color: #333333; cursor: pointer; display: inline-block; font-size: 14px; line-height: 20px; margin-bottom: 0; padding: 4px 12px; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; }
        .btn-primary { background-color: #006DCC; background-image: linear-gradient(to bottom, #0088CC, #0044CC); background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); color: #FFFFFF; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); }
        .btn { background: none repeat scroll 0 0 #EEEEEE; border: 0 none; border-radius: 0; box-shadow: none; color: #444444; filter: none; padding: 5px 9px; text-shadow: none; }
        .btn.btn-primary2 { background: none repeat scroll 0 0 #368EE0; color: #FFFFFF; filter: none; text-shadow: none; }
        .login .wrapper .login-body .submit input { float: right; }
        .login .wrapper .login-body .forget { margin-top: 50px; }
        .login .wrapper .login-body .forget a { background: none repeat scroll 0 0 #EEEEEE; color: #555555; display: block; padding: 10px 0; text-align: center; text-decoration: none; }
        .login .wrapper .login-body .submit .remember { float: left; margin-left: 1px; margin-top: 5px; }
        .remember label { float: left; }
        .remember input { float: left!important; margin-right: 5px; }
        .login .wrapper h1 > a img { margin-right: 20px; margin-top: -8px; }
    </style>
    <script type="text/javascript">
        $(function ($) {
            $("#lostpass").hide();
        });

        function ShowLostPassword() {
            $(".forget").html("");
            $("#login").hide();
            $("#lostpass").fadeIn(1000);
            $("#headlogin").html("Quên mật khẩu");
        }

        function ShowLoginForm() {
            $("#lostpass").hide();
            $(".forget").html("<a href=\"javascript:void(0);\" onclick=\"javascript:ShowLostPassword();\"><span>Quên mật khẩu?</span></a>");
            $("#login").fadeIn(1000);
            $("#headlogin").html("Đăng nhập");
        }
    </script>
</head>
<body class="login">
    <div class="wrapper">
        <h1><a href="/">
            <img src="/images/logo-big.png" alt="" class='retina-ready' width="49" height="50"><%= Configs.WebName %></a></h1>
        <div class="login-body">
            <h2 id="headlogin">Đăng nhập</h2>
            <form id="form1" runat="server">
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div id="login">
                            <asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false"
                                FailureText="* Sai tên đăng nhập hoặc mật khẩu."
                                DestinationPageUrl="~/inside/Default.aspx"
                                OnLoggedIn="LoginUserLoggedIn" OnLoginError="LoginUserLoginError">
                                <LayoutTemplate>
                                    <span class="alert alert-error" style="margin-bottom: 10px; float: left; width: 100%;">
                                        <asp:Literal ID="FailureText" runat="server"></asp:Literal>
                                    </span>
                                    <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="alert alert-error"
                                        ValidationGroup="LoginUserValidationGroup" ShowSummary="false" />

                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" Display="Dynamic" ControlToValidate="UserName"
                                        CssClass="alert alert-error" ErrorMessage="* Tên đăng nhập không được để trống."
                                        ValidationGroup="LoginUserValidationGroup">* Tên đăng nhập không được để trống.<br /></asp:RequiredFieldValidator>

                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" Display="Dynamic" ControlToValidate="Password"
                                        CssClass="alert alert-error" ErrorMessage="* Mật khẩu không được để trống."
                                        ValidationGroup="LoginUserValidationGroup">* Mật khẩu không được để trống.<br /><br /></asp:RequiredFieldValidator>

                                    <div class="control-group">
                                        <div class="email controls">
                                            <asp:TextBox ID="UserName" runat="server" CssClass="input-block-level" placeholder="Tên đăng nhập" data-rule-required="true"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <div class="pw controls">
                                            <asp:TextBox ID="Password" runat="server" CssClass="input-block-level" placeholder="Mật khẩu" data-rule-required="true" TextMode="Password"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="submit">
                                        <div class="remember">
                                            <asp:CheckBox ID="RememberMe" runat="server" Text="Ghi nhớ mật khẩu" />
                                        </div>
                                        <asp:Button ID="LoginButton" runat="server" CssClass="btn btn-primary2"
                                            CommandName="Login" Text="Đăng nhập" ValidationGroup="LoginUserValidationGroup" />
                                        <%--<input type="submit" name="LoginUser$LoginButton" value="ĐĂNG NHẬP" id="LoginUser_LoginButton" class="btn btn-primary" />--%>
                                    </div>
                                </LayoutTemplate>
                            </asp:Login>
                        </div>
                        <div id="lostpass" style="display: none;">
                            <asp:ValidationSummary ID="LostPwdValidationSummary" runat="server" CssClass="alert alert-error"
                                ValidationGroup="LostPwdValidationGroup" ShowSummary="false" />
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                                Display="Dynamic" CssClass="alert alert-error" ErrorMessage="* Email sai định dạng"
                                ValidationGroup="LostPwdValidationGroup" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">* Email sai định dạng.<br /></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="EmailRequire" runat="server" Display="Dynamic" ControlToValidate="txtEmail"
                                CssClass="alert alert-error" ErrorMessage="* Email không được để trống." ValidationGroup="LostPwdValidationGroup">* Email không được để trống.<br /></asp:RequiredFieldValidator>

                            <asp:Label ID="FailureText" runat="server" CssClass="alert alert-error" Text=""></asp:Label>

                            <div class="control-group">
                                <div class="email controls">
                                    <asp:TextBox ID="txtEmail" runat="server" CssClass="input-block-level" placeholder="Email" data-rule-required="true"></asp:TextBox>
                                </div>
                            </div>
                            <div class="submit">
                                <div class="remember">
                                    <a href="javascript:void(0);" onclick="javascript:ShowLoginForm();">Đăng nhập</a>
                                </div>
                                <asp:Button ID="btnLostPass" runat="server" CssClass="btn btn-primary2" OnClick="btnLostPass_OnClick"
                                    CommandName="GetPassword" Text="Gửi mật khẩu" ValidationGroup="LostPwdValidationGroup" />
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </form>
            <div class="forget clearfix">
                <a href="javascript:void(0);" onclick="javascript:ShowLostPassword();"><span>Quên mật khẩu?</span></a>
            </div>
        </div>
    </div>
</body>
</html>
